package com.adg.weather;

import android.content.res.Resources;
import android.util.DisplayMetrics;

public class Screensize {

	public double inwidth(DisplayMetrics dm){
		return (dm.widthPixels/dm.ydpi);		
	}
	public double inheight(DisplayMetrics dm){
		return (dm.heightPixels/dm.xdpi);		
	}
	public double xpix(DisplayMetrics dm){
		return dm.xdpi;		
	}
	public double ypix(DisplayMetrics dm){
		return dm.ydpi;		
	}
	
	public double scale(DisplayMetrics dm, char d, double pix, int sc){
		if(d=='x'){
			return dm.heightPixels/pix/sc;
		}
		if(d=='y'){
			return dm.widthPixels/pix/sc;

		}
		else
		return 0;
	}
}
